﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace RFBR.DataAccess
{
	public static class Database
	{
		private const string CONTEXT = "CONTEXT";
		public static DBContainer Context
		{
			get
			{
				DBContainer context = (DBContainer)HttpContext.Current.Cache.Get(CONTEXT);
				if (context == null)
				{
					context = new DBContainer();
					HttpContext.Current.Cache.Insert(CONTEXT, context);
				}
				return context;
			}
		}
	}
}
